package demo;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        System.out.println("请输入数字：");
        Scanner sc = new Scanner(System.in);
        //先获取用户输入的整数
        int num = sc.nextInt();
        while(num != 0){
            System.out.print(num%10+" ");
            num/=10;
        }
        //关闭Scanner,释放资源
        sc.close();
    }
}
